package suncertify.service.remote;

/**
 * This class implement server messages sended to all interested observers
 */
public class ServerNotification {
    private ServerAction action;
    private String message;

    /**
     * constructor with specified action
     * @param action server action
     */
    public ServerNotification(ServerAction action) {
        this.action = action;
    }

    /**
     * constructor with specified action and message
     * @param action server action
     * @param message server message
     */
    public ServerNotification(ServerAction action, String message) {
        this.action = action;
        this.message = message;
    }

    /**
     * returns an action
     * @return server action
     */
    public ServerAction getAction() {
        return action;
    }

    /**
     * returns a message
     * @return server message
     */
    public String getMessage() {
        return message;
    }
}
